#ifndef _SOKOBAN_H_
#define _SOKOBAN_H_

#define SOKOBAN_CELL_WIDTH 22
#define SOKOBAN_CELL_HEIGHT 22
#define SOKOBAN_FIELD_WIDTH 20
#define SOKOBAN_FIELD_HEIGHT 12
#define SOKOBAN_TOTAL_FIELD_WIDTH (SOKOBAN_FIELD_WIDTH * SOKOBAN_CELL_WIDTH)
#define SOKOBAN_TOTAL_FIELD_HEIGHT (SOKOBAN_FIELD_HEIGHT * SOKOBAN_CELL_HEIGHT)
#define SOKOBAN_TOUCH_WIDTH_X 100
#define SOKOBAN_TOUCH_WIDTH_Y 100

#define SOKOBAN_HOLE 0x00
#define SOKOBAN_WALL 0x01
#define SOKOBAN_FLOOR 0x02
#define SOKOBAN_BOX 0x03
#define SOKOBAN_GOAL 0x04
#define SOKOBAN_CHAR_S 0x05
#define SOKOBAN_CHAR_E 0x06
#define SOKOBAN_CHAR_N 0x07
#define SOKOBAN_CHAR_W 0x08
#define SOKOBAN_BOXGOAL 0x09

#define SOKOBAN_CHAR_TIMEOUT 700
#define SOKOBAN_TOUCH_TIMEOUT 120

#define SOKOBAN_UNDO_COUNT 100

#define c2b(y, x) ((y)*SOKOBAN_FIELD_WIDTH) + x
#define b2x(c) (c % SOKOBAN_FIELD_WIDTH)
#define b2y(c) (c / SOKOBAN_FIELD_WIDTH)

void sokobanInit(void);
void sokobanStart(void);

#define SOKOBAN_SHOW_SPLASH true

#ifdef SOKOBAN_SHOW_SPLASH
void sokobanShowSplash(void);
#endif

#endif /* _SOKOBAN_H_ */
